<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <script src="/static/web/editormd/lib/jquery.min.js"></script>
    <title>发动态</title>
  </head>
  <body>
    <div id="index">
      <h1>获取动态</h1>
    </div>
    <script>
      $(function() {
        $.ajax({
          type: 'GET',
          dataType: 'json',
          contentType: 'application/json',
          url: '/api/getDynamicList'
        })
          .done(function(r) {
            console.log(r)
            alert(r.message)
          })
          .fail(function(jqXHR, textStatus) {
            // Not 200:
            alert('Error: ' + jqXHR.responseJSON.message)
          })
      })
    </script>
  </body>
</html>
